package com.changan.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 阶段表
 * </p>
 *
 * @author NieChangan
 * @since 2025-09-03
 */
@Getter
@Setter
@ToString
@TableName("stages")
@Accessors(chain = true)
public class Stages extends Model<Stages> {

    /**
     * 阶段ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 阶段名称（如大一、大二）
     */
    @TableField("name")
    private String name;

    /**
     * 排序
     */
    @TableField("sort")
    private Integer sort;

    @TableField("created_at")
    private LocalDateTime createdAt;

    @TableField("updated_at")
    private LocalDateTime updatedAt;

    @Override
    public Serializable pkVal() {
        return this.id;
    }
}
